function arr (a,b){
    var result = []
    a.forEach((item,index,arr)=>{
        if(b.indexOf(item) == -1){
            result.push(item)
        }
    })
    return result;
}

console.log(arr([1,2,3],[1]))

function arr1(a,b){
    var result = []
    a.map((item,index,arr)=>{
        if (b.indexOf(item) == -1){
            result.push(item)
        }
        return ''
    })
    return result
}

console.log(arr1([4,5,6],[5,6,9]))
